<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2018/9/13
  Time: 19:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>欢迎来到图书管理界面</title>
    <link rel="stylesheet" type="text/css" href="/static/css/admin_main.css">
    <link rel="stylesheet" type="text/css" href="/static/css/stuAdmin.css">
    <script type="text/javascript" rel="script" src="/static/js/jq.js"></script>
    <script type="text/javascript" rel="script" src="/static/js/stuAdmin_main.js"></script>
</head>
<body>
<div class="navigator">
    <div class="title">
        <p>Manage</p>
    </div>
    <div class="admin_manage">
        <p>图书管理员</p>
    </div>
</div>
<div class="main_con">
    <div class="header">
        <p>ChenforCode图书馆管理系统</p>
        <a href="/login/doLogout">退出登陆</a>
    </div>
    <div class="content">
        <div class="info">
            <h3>图书</h3>
            <a class="create2">创建</a>
            <span>${sessionScope.delbook_msg}${sessionScope.addbook_msg}</span>
            <table class="gridtable">
                <tr>
                    <td>书号</td>
                    <td>书名</td>
                    <td>作者</td>
                    <td>出版社</td>
                    <td>书籍总数</td>
                    <td>书籍剩余</td>
                    <td>操作类型</td>
                </tr>
                <c:forEach items="${books}" var="b">
                    <tr>
                        <td>${b.bno}</td>
                        <td>${b.bname}</td>
                        <td>${b.author}</td>
                        <td>${b.pbhouse}</td>
                        <td>${b.total}</td>
                        <td>${b.still}</td>
                        <td>
                            <a href="/admin/upBookPro?id=${b.bno}">修改</a>
                            <a href="/admin/delBook?id=${b.bno}" onclick='return confirm("是否确认删除？")'>删除</a>
                        </td>
                    </tr>
                </c:forEach>
            </table>

            <div class="add_ad2" style="display: none">
                <form action="/admin/addBook" class="add_ad2_form">
                    <div>
                        书号:<input type="text" class="b" name="bno">
                    </div>
                    <div>
                        书名:<input type="text" class="b" name="bname">
                    </div>
                    <div>
                        作者:<input type="text" class="b" name="author">
                    </div>
                    <div>
                        出版社:<input type="text" class="b" name="pbhouse">
                    </div>
                    <div>
                        书籍总数:<input type="text" class="b total" name="total">
                    </div>
                    <div>
                        书籍剩余:<input type="text" class="b still" name="still">
                    </div>
                    <input type="button" class="ad_bt2" value="增加书籍">
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
